<!DOCTYPE html>
<html lang="{$lang}">
<head>
    <title>{if isset($title)}{$title}{else}{Config::get('page_name')}{/if}</title>
    <meta name="description" content="{if isset($description)}{$description}{else}{Config::get('page_description')}{/if}" />
    <meta name="keywords" content="{if isset($keywords)}{$keywords}{else}{Config::get('page_keywords')}{/if}" />
    <link rel="canonical" href="{Url::current()}"/>
    <link href="/styles/website/css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/styles/website/js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="/styles/website/js/scrollpagination.js"></script>
    <link href="/styles/website/css/scrollpagination_demo.css" rel="stylesheet" media="screen" />
</head>

<body>
<div class="header">
	<div class="header_sub">
    	<div class="logo"><a href="#"><img src="/styles/website/images/logo.png" alt="logo" /></a></div><!--logo-->
        <form class="form_login" action="{Url::anchor("dang-nhap")}" method="post">
            {if isset($webmember)}
            <div style="text-align:center">Xin chào <strong>{$webmember.name}</strong> - Bạn có <strong>{$webmember.pay}</strong> xu</div>
            <a href="{Url::anchor("doi-thong-tin-ca-nhan")}">Đổi thông tin</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{Url::anchor("tao-bai-viet")}">Tạo bài viết</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{Url::anchor("quan-ly-bai-viet")}">Quản lý bài viết</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{Url::anchor("member/logout")}">Đăng xuất</a>
            {else}
        	<label class="lable_first"></label><input name="username" type="text" class="txt_login" />
            <label class="lable_last"></label><input name="password" type="password" class="txt_login" />
            <input type="hidden" name="action" value="login" />
            <input type="image" src="/styles/website/images/login-btn.jpg" class="btn_login" />
            <div class="clear"></div>
            <div align="right"><a href="{Url::anchor("dang-ky-thanh-vien")}">Đăng ký</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{Url::anchor("quen-mat-khau")}">Quên mật khẩu</a></div>
            {/if}
        </form><!--form_login-->
        <div class="hotline">Xin hãy gọi: <span>{$config.hotline}</span></div>
        <div class="nav_menu">
        	<ul>
            	<li{if Input::get(0) eq 'home' || Input::get(0) eq null} class="active"{/if}><a href="{Url::base()}">Trang chủ</a></li>
                <li{if Input::get(0) eq 'post'} class="active"{/if}><a href="{Url::anchor("bai-giang")}">Bài giảng</a></li>
                <li><a href="#">Diễn đàn</a></li>
                <li class="{if Input::get(0) eq 'contact'}active {/if}ends"><a href="{Url::anchor("lien-he")}">Liên hệ</a></li>
            </ul>
        </div><!--nav_menu-->
    </div><!--header_sub-->
</div><!--header-->
<div class="contain">
	<div class="contain_left" id="contain_left">
    	<div class="contain_left_sub">
        	<h3 class="title_left">Danh mục khoá học</h3>
            <ul class="main_menu">
            	{foreach $categories as $row}
                	<li><a href="{Url::anchor("khoa-hoc/{$row.id}/{String::toUrl($row.name)}")}">{$row.name}</a></li>
                {/foreach}
            </ul>
        </div><!--contain_left_sub-->
        <div class="contain_left_sub">
        	<h3 class="title_left">Hỗ trợ Online <span class="icon_title"></span></h3>
            <ul class="support_left">
            	{foreach $supports as $row}
                	<li>
                        <a href="ymsgr:sendIM?{$row.yahoo}">
                            <img src="http://opi.yahoo.com/online?u={$row.yahoo}&amp;m=g&amp;t=2" alt="{$row.name}"/>
                        </a>
                        <a href="skype:{$row.skype}?chat">
                            <img class="skype" src="/styles/website/images/icon-skype.jpg" alt="{$row.name}"/>
                        </a>
                    </li>
                {/foreach}
            </ul>
        </div><!--contain_left_sub-->
        <div class="contain_left_sub">
        	<h3 class="title_left">Thống kê truy cập</h3>
            <ul class="counter_left">
            	<li><label>Đang online :</label>{$counter_onl}</li>
                <li><label>Hôm qua :</label>{$counter_ye}</li>
                <li><label>Tuần qua :</label>{$counter_we}</li>
                <li><label>Lượt truy cập :</label>{$counter_all}</li>
            </ul>
        </div><!--contain_left_sub-->
        <div class="adv_left">
        	<div class="adv_left_sub">
            	{foreach $adv_left as $row}
                	<a href="{$row.link}" target="_blank" title="{$row.name}"><img src="{$row.images}" alt="" width="220" /></a><br /><br />
                {/foreach}
            </div><!--adv_left_sub-->
        </div><!--adv_left-->
    </div><!--contain_left-->
    <div class="content_center">
    	{include file="$content_file"}
    </div><!--content_center-->
    <div class="contain_right" style="position:relative;">
    	
    	<div class="contain_right_sub_1">
            {foreach $adv_right as $row}
                <a href="{$row.link}" target="_blank" title="{$row.name}"><img src="{$row.images}" alt="" width="220" /></a><br /><br />
            {/foreach}
        </div><!--contain_right_sub_1-->
    </div><!--contain_right-->
    <div class="clear"></div>
  	<div class="footer">
		<div class="footer_menu">
        	<a href="#">Trang chủ</a>|<a href="#">Bài giảng</a>|<a href="#">Diễn đàn</a>|<a href="#">Liên hệ</a>
        </div><!--footer_menu-->
        {$config.info}<br />
        Copyright by Phuong Nam. Developed by <a href="http://phuongnamdesign.com">Phuong Nam Design</a>
    </div><!--footer-->
</div><!--contain-->

{if Input::get(0) neq 'product' && Input::get(0) neq 'home' && Input::get(0) neq null}
<script type="text/javascript">
	$(document).ready(function() {
		if($('.contain_left').height() >= $('.contain_right').height()){
			$('.wrapper').css('min-height',$('.contain_left').height());
		}
		else{
			$('.wrapper').css('min-height',$('.contain_right').height());
		}
	});
</script>
{/if}

</body>
</html>

